package com.qf.fmall.indeximg.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qf.fmall.indeximg.entity.IndexImg;
import com.qf.fmall.indeximg.mapper.IndexImgMapper;
import com.qf.fmall.indeximg.service.IIndexImgService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 轮播图 服务实现类
 * </p>
 *
 * @author wbw
 * @since 2023-11-28
 */
@Service
public class IndexImgServiceImpl extends ServiceImpl<IndexImgMapper, IndexImg> implements IIndexImgService {
    @Autowired
    private IndexImgMapper indexImgMapper;
    @Override
    public List<IndexImg> selectImg() {
        QueryWrapper<IndexImg> wrapper = new QueryWrapper<>();
        wrapper.eq("status",1);
        wrapper.orderByAsc("seq");
        List<IndexImg> data = indexImgMapper.selectList(wrapper);
        return data;
    }
}
